#ifndef LOG_H
#define LOG_H
#include <QString>
#include <QFile>
#include <QTextStream>
#include <QtMessageHandler>
#include <QDateTime>
#include <QThread>
#include <QDir>
#include <QTimer>
#include <common.h>
#include <QCoreApplication>
#include <QFileInfo>
#define MB 1024*1024
class Log : public QObject
{
    Q_OBJECT
public:
    Log();
    int Log_Size;
    QString Logname;
    QString Savename;
    QString oldname;
    void StartLog();
    bool isDirExist(QString fullPath);
    QTimer    logclock;
    void init(QString Logname);
private slots:
    void SaveLog();
};

#endif // LOG_H
